package com.example.springbootv1.service.impl;

import com.example.springbootv1.mapper.PositionAndEmployeeMapper;
import com.example.springbootv1.pojo.Employee;
import com.example.springbootv1.pojo.Position;
import com.example.springbootv1.service.PositionAndEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PositionAndEmployeeServiceImpl implements PositionAndEmployeeService {
    @Autowired
    private PositionAndEmployeeMapper positionAndEmployeeMapper;

    @Override
    public List<Position> getEmployeeByPosition(Position position) {
        return positionAndEmployeeMapper.getEmployeeByPosition(position);
    }

    @Override
    public List<Employee> getPositionByEmployee(Employee employee) {
        return positionAndEmployeeMapper.getPositionByEmployee(employee);
    }

}
